package com.jk.controller;

import com.jk.entity.InvestEntity;
import com.jk.entity.MediaEntity;
import com.jk.service.InvestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 纪思齐
 * @version 1.0
 * @BelongsProject: 2203java-financial
 * @BelongsPackage: com.jk.controller
 * @description: TODO    //投资查询 - InvestEntity
 * @date 2022/11/2 10:48
 */
@RestController
@RequestMapping("invest")
public class InvestController {

    @Autowired
    private InvestService investService;

    /*
     * @description:  查询投资表
     * @author: 纪思齐
     * @date: 2022/11/2 10:54
     * @param: [investEntity]
     * @return: java.util.Map
     **/
    @RequestMapping("queryInvestmentList")
    public Map  queryInvestmentList(InvestEntity investEntity){
        return investService.queryInvestmentList(investEntity);
    }
    /*
    *
     * @Author 位佳生
     * @Description //TODO 根据id回显投资公司信息
     * @Date 2022/11/8 10:30
     * @param propertyId: 
     * @return: com.jk.entity.InvestEntity
     **/
    @RequestMapping("queryInvestmentGetById")
    public InvestEntity  queryInvestmentGetById(Integer propertyId){
        return investService.queryInvestmentGetById(propertyId);
    }

    /*
     * @description:  新增投资项目
     * @author: 纪思齐
     * @date: 2022/11/11 15:09
     * @param: [investEntity]
     * @return: java.util.Map
     **/
    @RequestMapping("IncreaseInvest")
    public  Map  IncreaseInvest(InvestEntity investEntity){
        return investService.IncreaseInvest(investEntity);
    }

    /*
     * @description:  获取媒体报道信息
     * @author: 纪思齐
     * @date: 2022/11/15 20:39
     * @param: []
     * @return: java.util.Map
     **/
    @RequestMapping("getMediaList")
    public  Map  getMediaList(){
        return investService.getMediaList();
    }

    /*
     * @description:  新增媒体报道
     * @author: 纪思齐
     * @date: 2022/11/16 19:53
     * @param: [mediaEntity]
     * @return: java.util.Map
     **/
    @RequestMapping("addMedia")
    public  Map   addMedia(MediaEntity mediaEntity){
        return  investService.addMedia(mediaEntity);
    }

}
